#include "test_sqlhelper.h"

void test_create()
{
    SqlHelper::instance();
}

void test_insert()
{
    SqlHelper& helper = SqlHelper::instance();

    helper.insertUser("user", "1234", "user");
    helper.insertUser("admin", "1234", "admin");
}

void test_get()
{
    SqlHelper& helper = SqlHelper::instance();

    QString passwd = helper.getPassword("user");
    QString type = helper.getType("user");
    qDebug() << "passwd: " << passwd << " type: " << type;

    double caffeine = helper.getCaffeine("百事", "可乐");
    qDebug() << "caffeine: " << caffeine;
}
